Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql,logictest,descidgen: abstract descriptor ID generation, make deterministic in logictests #85366

Merged

Conversation

ajwerner
Copy link
Contributor

@ajwerner ajwerner commented Jul 30, 2022

The first commit adds an interface for descriptor ID generation and propagates the interface from the ExecCfg into the EvalContext. There are some minor refactoring to avoid propagating an ExecCfg further up the stack by making the parameters more specific. The second commit adds a testing knob to use a transactional implementation in the EvalContext.

Fixes #37751
Fixes #69226

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@ajwerner ajwerner marked this pull request as ready for review July 30, 2022 18:33
@ajwerner ajwerner requested a review from a team July 30, 2022 18:33
@ajwerner ajwerner requested a review from a team as a code owner July 30, 2022 18:33
@ajwerner ajwerner requested a review from a team July 30, 2022 18:33
@ajwerner ajwerner requested review from a team as code owners July 30, 2022 18:33
@ajwerner ajwerner requested a review from rhu713 July 30, 2022 18:33
Copy link
Contributor

@postamar postamar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming the test failure in CI is unrelated or easily addressed. This is a Good Change.

This adds a layer of indirection around descriptor ID generation in order to
facilitate injecting transactional generation.

Release note: None
This commit adds a testing knob which results in descriptor ID generation
being handled transactionally. The logictests now use this knob.

Fixes cockroachdb#37751
Fixes cockroachdb#69226

Release note: None
@ajwerner ajwerner force-pushed the ajwerner/make-descriptor-allocation-atomic branch from 76125a3 to 85ce24d Compare August 1, 2022 13:13
@ajwerner
Copy link
Contributor Author

ajwerner commented Aug 1, 2022

I'm pretty certain that this change is not causing any of the failures. They seem to be under stressrace. This change forces lots of those to run, and they seem flakey. This change doesn't affect any of those tests, so I don't think it's related.

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Aug 1, 2022

Build succeeded:

@craig craig bot merged commit 314baa5 into cockroachdb:master Aug 1, 2022
ajwerner added a commit to ajwerner/cockroach that referenced this pull request Aug 2, 2022
In cockroachdb#85366, we introduced a mechanism to make descriptor ID generation
transactional and, in the absence of parallelism, deterministic. That PR
failed to set the knob for secondary tenant configurations. This commit
rectifies that oversight.

This should allow us to avoid flakes like:
https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_GitHubCiOptional/5939930?showRootCauses=false&expandBuildChangesSection=true&expandBuildProblemsSection=true&expandBuildTestsSection=true

Release note: None
craig bot pushed a commit that referenced this pull request Aug 2, 2022
85444: logictest: use deterministic ID generation in tenants r=ajwerner a=ajwerner

In #85366, we introduced a mechanism to make descriptor ID generation
transactional and, in the absence of parallelism, deterministic. That PR
failed to set the knob for secondary tenant configurations. This commit
rectifies that oversight.

This should allow us to avoid flakes like:
https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_GitHubCiOptional/5939930?showRootCauses=false&expandBuildChangesSection=true&expandBuildProblemsSection=true&expandBuildTestsSection=true

Release note: None

Co-authored-by: Andrew Werner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants